import tornado.ioloop
import tornado.web
from hello_handler import * 

settings = {
        "cookie_secret": "61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=",
        "login_url": "/login",
        "xsrf_cookies": True,
        "template_path": os.path.join(os.path.dirname(__file__), "templates",
        "static_path": os.path.join(os.path.dirname(__file__), "static",
        "debug"=True
        }

application = tornado.web.Application([
    (r"/", HomeHandler),

    (r"^/users/$", UsersHandler),                 #index
    (r"^/users/new/$", UsersNewHandler),          #new create
    (r"^/user/show/(.*)/$", UserShowHandler),     #show 
    (r"^/user/edit/(.*)/$", UserEditHandler),     #edit update
    (r"^/user/delete/(.*)/$", UserDeleteHandler), #delete
    ], **settings) 

if __name__ == "__main__":
    application.listen(8888)
    tornado.ioloop.IOLoop.instance().start()
